<?php 
namespace app\model;
use think\Model;

class Order extends Model
{	
	public static function getCommonIsCn($key){
		$list = ['否','是'];
		return $list[$key];
	}

	public static function getCommonIsList(){
		$list = ['否','是'];
		return $list;
	}

    public static function getTypeCn($key){
        $list = ['NEW'=>'新购','RENEW'=>'续费','SHIFT_CHARGE'=>'后付费计费方案变更','DILATATION'=>'升级','SHRINKAGE'=>'降级','RESIZE'=>'后付费变配','COMPENSATE_TIME'=>'赔付时长','REFUND'=>'退款','TRANSFER_IN'=>'转入','TO_PREPAY'=>'后付费转预付费','TO_POSTPAY'=>'预付费转后付费','TIME_EXPAND'=>'续时订单'];
        return $list[$key];
    }

    public static function getTypeList(){
        $list = ['NEW'=>'新购','RENEW'=>'续费','SHIFT_CHARGE'=>'后付费计费方案变更','DILATATION'=>'升级','SHRINKAGE'=>'降级','RESIZE'=>'后付费变配','COMPENSATE_TIME'=>'赔付时长','REFUND'=>'退款','TRANSFER_IN'=>'转入','TO_PREPAY'=>'后付费转预付费','TO_POSTPAY'=>'预付费转后付费','TIME_EXPAND'=>'续时订单'];
        return $list;
    }

    public static function getSubscriptionCn($key){
        $list = ['prepay'=>'预付费','postpay'=>'后付费','postpay__prepay'=>'预付费和后付费组合类型'];
        return $list[$key];
    }

    public static function getSubscriptionList(){
        $list = ['prepay'=>'预付费','postpay'=>'后付费','postpay__prepay'=>'预付费和后付费组合类型'];
        return $list;
    }

    // public static function getStatusCn($key){
    //     $list = ['NEED_PURCHASE'=>'未支付','CANCELLED'=>'已取消','DEFERRED_CREATE'=>'已支付','READY_FOR_CREATE'=>'已支付','CREATING'=>'已支付','CREATED'=>'已支付','CREATE_FAILED'=>'已作废','EXPIRED'=>'已作废','REFUND_SUCC'=>'已作废','REFUND_FAILED'=>'已支付'];
    //     return $list[$key];
    // }

    // public static function getStatusList(){
    //     $list = ['NEED_PURCHASE'=>'待支付','CANCELLED'=>'取消','DEFERRED_CREATE'=>'延迟生效','READY_FOR_CREATE'=>'待创建','CREATING'=>'创建中','CREATED'=>'已创建','CREATE_FAILED'=>'创建失败','EXPIRED'=>'已过期','REFUND_SUCC'=>'退款成功','REFUND_FAILED'=>'退款失败'];
    //     return $list;
    // }
    public static function getStatusCn($key){
        $list = ['待支付','已完成',-1=>'已作废'];
        return $list[$key];
    }

    public static function getStatusList(){
        $list = ['待支付','已完成',-1=>'已作废'];
        return $list;
    }
}


 ?>